package com.slz3.business.module.memberManagement.memAppKey.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.memberManagement.memAppKey.domain.MemAppKey;
import com.slz3.business.module.memberManagement.memAppKey.domain.MemAppKeyCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class MemAppKeyResAtomic extends MemAppKeyResExecutor {

    public Mono<ServerResponse> add_$MemAppKeyUpdateLock(ServerRequest req, MemAppKey memAppKey) {
        return MemAppKeyResSafeValid.add(req, memAppKey) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.add(req, memAppKey);
    }

    public Mono<ServerResponse> delete_$MemAppKeyUpdateLock(ServerRequest req, MemAppKeyCondition memAppKeyCondition) {
        return MemAppKeyResSafeValid.delete(req, memAppKeyCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.delete(req);
    }

    public Mono<ServerResponse> modify_$MemAppKeyUpdateLock(ServerRequest req, MemAppKey memAppKey) {
        return MemAppKeyResSafeValid.modify(req, memAppKey) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.modify(req, memAppKey);
    }

    public Mono<ServerResponse> info_$MemAppKeyUpdateLock(ServerRequest req) {
        return MemAppKeyResSafeValid.info(req) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.info(req);
    }

    public Mono<ServerResponse> auditSubmit_$MemAppKeyUpdateLock(ServerRequest req, MemAppKeyCondition memAppKeyCondition) {
        return MemAppKeyResSafeValid.auditSubmit(req, memAppKeyCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.auditSubmit(req);
    }

    public Mono<ServerResponse> audit_$MemAppKeyUpdateLock(ServerRequest req, MemAppKeyCondition memAppKeyCondition) {
        return MemAppKeyResSafeValid.audit(req, memAppKeyCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.audit(req);
    }

    public Mono<ServerResponse> auditReject_$MemAppKeyUpdateLock(ServerRequest req, MemAppKeyCondition memAppKeyCondition) {
        return MemAppKeyResSafeValid.auditReject(req, memAppKeyCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.auditReject(req);
    }


    public Mono<ServerResponse> usingEnable_$MemAppKeyUpdateLock(ServerRequest req, MemAppKeyCondition memAppKeyCondition) {
        return MemAppKeyResSafeValid.usingEnable(req, memAppKeyCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.usingEnable(req);
    }

    public Mono<ServerResponse> usingDisable_$MemAppKeyUpdateLock(ServerRequest req, MemAppKeyCondition memAppKeyCondition) {
        return MemAppKeyResSafeValid.usingDisable(req, memAppKeyCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.usingDisable(req);
    }
}
